package com.example.shipload_e.util;

import android.os.Environment;

/**
 * @author winaya
 */
public class HttpConstant {
	// 保存用户信息的xml文件名称?
	public static final String	SAVE_USER	           = "saveUser";
	// 数据库名称?
	public static final String	DBNAME	               = "SHIPMENT_E.db";
	// 发送用户名的key
	public static final String	ACCOUNT	               = "user";
	// 发送密码的key
	public static final String	PASSWORD	           = "password";

	/**
	 * 请求操作类型标识
	 */
	public static final String	TAG_ACT_FLAG	       = "act_flag";
	/**
	 * 请求操作:登录
	 */
	public static final String	ACT_FLAG_LOGIN	       = "login";

	/**
	 * 参数类型标识
	 */
	public static final String	TAG_PARAM	           = "params";
	/**
	 * 账号参数
	 */
	public static final String	PARAM_ACCOUNT	       = "account";
	/**
	 * 密码参数
	 */
	public static final String	PARAM_PASSWORD	       = "password";
	/**
	 * 设备唯一码
	 */
	public static final String	PARAM_DEVICE_ID	       = "deviceuuid";

	/**
	 * 船舶ID参数标识
	 */
	public static final String	PARAM_SHIP_ID	       = "shipid";
	/**
	 * 船舶名称参数标识
	 */
	public static final String	PARAM_SHIP_NAME	       = "shipname";
	/**
	 * 账号是否激活
	 */
	public static final String	ACCOUNT_ISACTIVE	   = "isactive";
	/**
	 * 账号已激活
	 */
	public static final String	ACCOUNT_ACTIVE	       = "active";
	/**
	 * 账号未激活
	 */
	public static final String	ACCOUNT_DISACTIVE	   = "disactive";
	/**
	 * 账号验证是否通过
	 */
	public static final String	MATCH_ISPASS	       = "ispass";
	/**
	 * 通过验证
	 */
	public static final String	MATCH_PASS	           = "pass";
	/**
	 * 密码错误，验证失败
	 */
	public static final String	MATCH_NOTPASS	       = "notpass";
	/**
	 * 网络异常
	 */
	public static final String	NETWORK_UNAVAILABLE	   = "unavailable";
	/**
	 * 帐号已绑定其他设备，登录验证失败
	 */
	public static final String	DEVICE_ALREADY_LOGIN	= "DAL";
	/**
	 * 参数异常
	 */
	public static final String	PARAMS_INVALID	       = "e_piv";
	/**
	 * 数据库插入数据成功
	 */
	public static final String	INSERT_SUCCESS	       = "数据库插入成功";
	/**
	 * 数据库插入数据失败
	 */
	public static final String	INSERT_FAIL	           = "数据库插入失败";
	/**
	 * 操作结果标识符
	 */
	public static final String	OPA_TAG	               = "OTG";
	/**
	 * 操作成功
	 */
	public static final String	OPA_SUCCESS	           = "操作成功";
	/**
	 * 操作失败
	 */
	public static final String	OPA_FAIL	           = "操作失败";
	/**
	 * 请求成功
	 */
	public static final String	SUBMIT_SUCCESS	       = "request_success";
	/**
	 * 请求失败
	 */
	public static final String	SUBMIT_FAIL	           = "request_fail";

	/**
	 * 网络超时
	 */
	public static final String	TIME_OUT_EXCEPTION	   = "网络超时";
	/**
	 * 图片上传成功
	 */
	public static final String	PHOTO_UPLOAD_SUCCESS	= "photo_upload_success";
	/**
	 * 图片上传失败
	 */
	public static final String	PHOTO_UPLOAD_FAIL	   = "photo_upload_fail";
	/**
	 * 图片上传异常
	 */
	public static final String	PHOTO_UPLOAD_EXCEPTION	= "photo_upload_exception";
	/**
	 * 自动更新
	 */
	public static final String	SDCARD_ROOT	           = Environment.getExternalStorageDirectory()
	                                                           .getAbsolutePath();
	public static final String	APK_PATH	           = SDCARD_ROOT + "/smas/apk";
	public final static int	   GET_VERSION_FAIL	       = -1;	                    // 获取版本失败
	public final static int	   GET_VERSION_SUCCEE	   = 1;
	public final static String	KEY_DATA	           = "KEY_DATA";
	public final static int	   DOWN_APK_SUCCEE	       = 2;

	public final static String	KEY_VERSION_DATA	   = "KEY_VERSION_DATA";
}
